The following variables control the way Ediff highlights difference regions:
ediff-before-flag-bolediff-after-flag-eolediff-before-flag-molediff-after-flag-molediff-current-diff-face-Aediff-current-diff-face-Bediff-current-diff-face-Cediff-fine-diff-face-Aediff-fine-diff-face-Bediff-fine-diff-face-Cediff-even-diff-face-Aediff-even-diff-face-Bediff-even-diff-face-Cediff-odd-diff-face-Aediff-odd-diff-face-Bediff-odd-diff-face-Cediff-force-facest to make sure that Ediff uses faces to highlight
differences.ediff-highlight-all-diffsediff-highlight-all-diffs to nil.
Type h to restore highlighting for all
differences.
Ediff lets you switch between the two modes of highlighting. That is, you can switch interactively from highlighting using faces to highlighting using string flags, and back. Of course, switching has effect only under a windowing system. On a text-only terminal or in an xterm window, the only available option is highlighting with strings.
If you want to change the default settings
for ediff-force-faces and
ediff-highlight-all-diffs, you must do it
before Ediff is loaded.
You can also change the defaults for the faces used to highlight the difference regions. There are two ways to do this. The simplest and the preferred way is to use the customization widget accessible from the menubar. Ediff's customization group is located under "Tools", which in turn is under "Programming". The faces that are used to highlight difference regions are located in the "Highlighting" subgroup of the Ediff customization group.
The second, much more arcane, method to change default faces is to include some Lisp code in ~/.emacs. For instance,
(setq ediff-current-diff-face-A
(copy-face 'bold-italic 'ediff-current-diff-face-A))
would use the pre-defined face
bold-italic to highlight the current difference
region in buffer A (this face is not a good choice, by the
way).
If you are unhappy with just some of the aspects of
the default faces, you can modify them when Ediff is being loaded
using ediff-load-hook. For instance:
(add-hook 'ediff-load-hook
(lambda ()
(set-face-foreground
ediff-current-diff-face-B "blue")
(set-face-background
ediff-current-diff-face-B "red")
(make-face-italic
ediff-current-diff-face-B)))
Please note: to set Ediff's faces, use only
copy-face or set/make-face-... as shown
above. Emacs' low-level face-manipulation functions should be
avoided.